<?php
$Support=mysql_query("SELECT * FROM $NomTable ORDER BY idEmail") or die(mysql_error());
$NbFF=0;
while($rowFF=mysql_fetch_array($Support)){
$NavFF=$rowFF['Agent'];
	if(eregi('Firefox', $NavFF)){
	$NbFF++;
	}
}
?>
<table width="490" border="0" cellspacing="0" cellpadding="0" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; " align="center">
  <tr style=" border:1px solid #CCCCCC; ">
  <td colspan="2"  class="TitleStat">Information sur le navigateur:   </td>
  </tr>
  <tr style=" border:1px solid #CCCCCC; ">
    <td width="187"  style=" border-bottom:1px solid #CCCCCC; "><img src="./images/iconesStat/Firefox.jpg" width="20" height="20"> Ouverts sur Firefox: </td>
    <td style="text-align:left; font-size:24px; border-bottom:1px solid #CCCCCC;  "><?php 
	$RatioFF=(($NbFF)*100)/$nbEmailTotal;
  	echo sprintf("%.2f",$RatioFF)." % <font style='font-size:12px;'>soit ".$NbFF." ouvertures</font>"; ?></td>
  </tr>
  
 <?php
 $Support=mysql_query("SELECT * FROM $NomTable ORDER BY idEmail") or die(mysql_error());
 $NbIE=0;
while($rowIE=mysql_fetch_array($Support)){
$NavIE=$rowIE['Agent'];
	if(eregi('MSIE ', $NavIE) || eregi('MSIE 6', $NavIE) || eregi('MSIE 7', $NavIE) | eregi('MSIE 8', $NavIE) | eregi('MSIE 9', $NavIE)){
	$NbIE++;
	}
}
?>
   <tr style=" border:1px solid #CCCCCC; ">
  <td width="187" style=" border-bottom:1px solid #CCCCCC; "><img src="./images/iconesStat/IE.jpg" width="20" height="20"> Ouverts sur IE : </td>
  <td width="303" style="text-align:left; font-size:24px; border-bottom:1px solid #CCCCCC; "><?php 
	$RatioIE=(($NbIE)*100)/$nbEmailTotal;
  	echo sprintf("%.2f",$RatioIE)." % <font style='font-size:12px;'>soit ".$NbIE." ouvertures</font>"; ?></td>
  </tr>
  
   <?php
 $Support=mysql_query("SELECT * FROM $NomTable ORDER BY idEmail") or die(mysql_error());
 $NbSaf=0;
while($rowSaf=mysql_fetch_array($Support)){
$NavSaf=$rowSaf['Agent'];
	if(eregi('AppleWebKit', $NavSaf)){
	$NbSaf++;
	}
}
?>
   <tr style=" border:1px solid #CCCCCC; ">
  <td width="187" style=" border-bottom:1px solid #CCCCCC; "><img src="./images/iconesStat/Safari.jpg" width="20" height="20"> Ouverts sur Safari: </td>
  <td width="303" style="text-align:left; font-size:24px; border-bottom:1px solid #CCCCCC; "><?php 
	$RatioSaf=(($NbSaf)*100)/$nbEmailTotal;
  	echo sprintf("%.2f",$RatioSaf)." % <font style='font-size:12px;'>soit ".$NbSaf." ouvertures</font>"; ?></td>
  </tr>
  
   <?php
 $Support=mysql_query("SELECT * FROM $NomTable ORDER BY idEmail") or die(mysql_error());
 $NbThun=0;
while($rowThun=mysql_fetch_array($Support)){
$NavThun=$rowThun['Agent'];
	if(eregi('Thunderbird', $NavThun)){
	$NbThun++;
	}
}
?>
     <tr style=" border:1px solid #CCCCCC; ">
     <td width="187" style=" border-bottom:1px solid #CCCCCC; "><img src="./images/iconesStat/Thunderbird.jpg" width="20" height="20"> Ouverts sur Thunderbird: </td>
     <td style="text-align:left; font-size:24px; border-bottom:1px solid #CCCCCC; "><?php 
	$RatioThun=(($NbThun)*100)/$nbEmailTotal;
  	echo sprintf("%.2f",$RatioThun)." % <font style='font-size:12px;'>soit ".$NbThun." ouvertures</font>"; ?></td>
   </tr>
   <?php
 $Support=mysql_query("SELECT * FROM $NomTable ORDER BY idEmail") or die(mysql_error());
 $NbAutre=0;
while($rowAutre=mysql_fetch_array($Support)){
$NavAutre=$rowAutre['Agent'];
	if(eregi('Thunderbird', $NavAutre) || eregi('AppleWebKit', $NavAutre) || eregi('MSIE', $NavAutre) || eregi('Firefox', $NavAutre)){
	
	}
	else{
	$NbAutre++;
	}
}
?>
   <tr style=" border:1px solid #CCCCCC; ">
     <td width="187" style=" border-bottom:1px solid #CCCCCC; "><img src="./images/iconesStat/AutresNav.jpg" width="20" height="20"> Ouverts sur autres:</td>
     <td style="text-align:left; font-size:24px; border-bottom:1px solid #CCCCCC; "><?php 
	$RatioAutre=(($NbAutre)*100)/$nbEmailTotal;
  	echo sprintf("%.2f",$RatioAutre)." % <font style='font-size:12px;'>soit ".$NbAutre." ouvertures</font>"; ?></td>
   </tr>
</table>
<div class="LogoStat">
	<div class="IconeStat" style="margin:0px 0 0 0;" >
	<img src="./images/iconesStat/Firefox.jpg" ><img src="./images/iconesStat/BGFF.jpg" >
	</div>
	<div class="IconeStat">
	<img src="./images/iconesStat/IE.jpg"><img src="./images/iconesStat/BGIE.jpg">
	</div>
	<div class="IconeStat">
	<img src="./images/iconesStat/Safari.jpg"><img src="./images/iconesStat/BGSaf.jpg"></div>
	<div class="IconeStat">
	<img src="./images/iconesStat/Thunderbird.jpg"><img src="./images/iconesStat/BGTB.jpg"></div>

	<div class="IconeStat">
	<img src="./images/iconesStat/AutresNav.jpg"><img src="./images/iconesStat/BGA.jpg">
	</div>
	<div class="clr"></div>
</div>
<?php
$PrcFF=sprintf("%.2f",$RatioFF);
$WFF=$PrcFF*450/100;

$PrcIE=sprintf("%.2f",$RatioIE);
$WIE=$PrcIE*450/100;

$PrcSaf=sprintf("%.2f",$RatioSaf);
$WSaf=$PrcSaf*450/100;

$PrcTB=sprintf("%.2f",$RatioThun);
$WTB=$PrcTB*450/100;

?>
<div class="ContainStat1">

<div class="Pourcent1FF" style="width:<?php echo $WFF; ?>px;"></div>
<div class="Pourcent1IE" style="width:<?php echo $WIE; ?>px;"></div>
<div class="Pourcent1Saf" style="width:<?php echo $WSaf; ?>px;"></div>
<div class="Pourcent1TB" style="width:<?php echo $WTB; ?>px;"></div>

<div class="clr"></div>
</div>